body {
	margin: 0;
}

* {
	box-sizing: border-box;
}

.app-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100vh;
}

.ship-buttons {
	display: flex;
	justify-content: space-between;
	width: 300px;
	padding-bottom: 10px;
}

.ship-buttons button {
	border-radius: 2px;
	padding: 2px 4px;
	font-size: 0.75rem;
	background-color: white;
	color: black;
	&:not(.active) {
		box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.5);
	}
	&.active {
		box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5);
	}
}

.app {
	display: flex;
	max-width: 1024px;
	border: 1px solid #000;
	border-start-end-radius: 0.5rem;
	border-start-start-radius: 0.5rem;
	border-end-start-radius: 50% 8%;
	border-end-end-radius: 50% 8%;
	overflow: hidden;
}

.search {
	width: 150px;
	max-height: 400px;
	overflow: hidden;
	display: flex;
	flex-direction: column;

	input {
		width: 100%;
		border: 0;
		border-bottom: 1px solid #000;
		padding: 8px;
		line-height: 1.5;
		border-top-left-radius: 0.5rem;
	}

	ul {
		flex: 1;
		list-style: none;
		padding: 4px;
		padding-bottom: 30px;
		margin: 0;
		display: flex;
		flex-direction: column;
		gap: 8px;
		overflow-y: auto;
		li {
			button {
				display: flex;
				align-items: center;
				gap: 4px;
				border: none;
				background-color: transparent;
				&:hover {
					text-decoration: underline;
				}
				img {
					width: 20px;
					height: 20px;
					object-fit: contain;
					border-radius: 50%;
				}
			}
		}
	}
}

.details {
	flex: 1;
	height: 400px;
	position: relative;
	overflow: hidden;
}

.ship-info {
	height: 100%;
	width: 300px;
	margin: auto;
	overflow: auto;
	background-color: #eee;
	border-radius: 4px;
	padding: 20px;
	position: relative;
}

.ship-info.ship-loading {
	opacity: 0.6;
}

.ship-info h2 {
	font-weight: bold;
	text-align: center;
	margin-top: 0.3em;
}

.ship-info img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: contain;
}

.ship-info .ship-info__img-wrapper {
	margin-top: 20px;
	width: 100%;
	height: 200px;
}

.ship-info .ship-info__fetch-time {
	position: absolute;
	top: 6px;
	right: 10px;
}

.app-error {
	position: relative;
	background-image: url('/img/broken-ship.webp');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	width: 400px;
	height: 400px;
	p {
		position: absolute;
		top: 30%;
		left: 50%;
		transform: translate(-50%, -50%);
		background-color: white;
		padding: 6px 12px;
		border-radius: 1rem;
		font-size: 1.5rem;
		font-weight: bold;
		width: 300px;
		text-align: center;
	}
}
